package com.example.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.entity.ActivityRecord;
import java.util.Map;
import java.util.List;

public interface ActivityRecordService extends IService<ActivityRecord> {
    
    // 志愿者签到
    boolean signIn(Long activityId, Long volunteerId, String location);
    
    // 志愿者签退
    boolean signOut(Long activityId, Long volunteerId);
    
    // 补录签到记录
    boolean addRecord(ActivityRecord record);
    
    // 审核签到记录
    boolean reviewRecord(Long id, Integer status, String rejectReason, Long reviewerId);
    
    // 分页查询签到记录
    Page<ActivityRecord> getRecordList(Integer pageNum, Integer pageSize, Long activityId, 
            Long volunteerId, Integer status, Integer type);
    
    // 获取签到记录详情
    ActivityRecord getRecordInfo(Long id);
    
    // 删除签到记录
    boolean deleteRecord(Long id);
    
    // 批量删除签到记录
    boolean batchDeleteRecords(Long[] ids);
    
    // 统计志愿者的服务时长
    Map<String, Object> getVolunteerServiceStats(Long volunteerId);
    
    // 统计活动的服务情况
    Map<String, Object> getActivityServiceStats(Long activityId);
    
    // 获取时间段内的服务统计
    Map<String, Object> getServiceStatsByDateRange(String startDate, String endDate);
    
    // 获取志愿者服务排行榜
    List<Map<String, Object>> getVolunteerRankingList(Integer limit);
    
    // 获取活动参与情况分析
    Map<String, Object> getActivityParticipationAnalysis(Long activityId);
    
    // 获取服务类型分布统计
    List<Map<String, Object>> getServiceTypeDistribution();
} 